﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Detail.aspx.cs" Inherits="HomeFramework.Manager.Detail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div runat="server" id="MessageBox" style="width: 100%; background-color: Red; color: White;">
        <asp:Label runat="server" ID="messageLabel" />
    </div>
    <h3>
        Service Detail</h3>
    <div style="float: right;">
        <asp:LinkButton runat="server" ID="ActivateButton" Text="Enable Service" OnClick="ActivateButton_Click" />
        <br />
        <asp:LinkButton runat="server" ID="DeactivateButton" Text="Disable Service" OnClick="DeactivateButton_Click" />
    </div>
    <h2 style="clear: both;">
        <asp:Label runat="server" ID="ServiceName" /></h2>
    <asp:DetailsView runat="server" ID="serviceDetail" CellPadding="4" Width="100%" ForeColor="#333333"
        GridLines="None" AutoGenerateRows="false">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
        <EditRowStyle BackColor="#999999" />
        <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Fields>
            <asp:BoundField DataField="Enabled" HeaderText="Enabled" />
            <asp:BoundField DataField="Name" HeaderText="Name" />
            <asp:BoundField DataField="Namespace" HeaderText="Namespace" />
            <asp:BoundField DataField="HandlerFullName" HeaderText="Handler FullName" />
            <asp:BoundField DataField="ContractFullName" HeaderText="Contract FullName" />
            <asp:BoundField DataField="AssemblyFullName" HeaderText="Assembly Name" />
            <asp:BoundField DataField="Version" HeaderText="Assembly Version" />
            <%--<asp:BoundField DataField="Role" HeaderText="Default Access Role" />--%>
        </Fields>
    </asp:DetailsView>
    <br />
    <div style="float: right;">
        <asp:FileUpload runat="server" ID="fileUpload" Visible="false" />
        <asp:LinkButton runat="server" ID="uploadButton" Text="Upload Reference" OnClick="uploadButton_Click" />
    </div>
    <h3 style="clear: both;">
        References</h3>
    <%--<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="RemoveReference" EnableCaching="false"
        SelectMethod="GetReferences" TypeName="HomeFramework.Model.Handler">
        <DeleteParameters>
            <asp:QueryStringParameter Name="HandlerID" QueryStringField="ID" Type="Int32" />
            <asp:Parameter Name="ID" Type="Int32" />
        </DeleteParameters>
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="" Name="ID" QueryStringField="ID" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>--%>
    <asp:GridView runat="server" ID="referencesGrid" AutoGenerateColumns="False" DataKeyNames="ID"
        Width="100%" CellPadding="4" ForeColor="#333333"
        GridLines="None" onrowdeleting="referencesGrid_RowDeleting">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:BoundField DataField="ReferenceFullName" HeaderText="Full Name" ReadOnly="True"
                SortExpression="ReferenceFullName" />
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Styles/x.png" OnClientClick="return confirm('Confirm delation?')"
                        CommandName="Delete" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>
</asp:Content>
